package itcz.example.pattern.structure_type.flyweight;

/**
 * @ClassName: Abstractbox
 * @Author: ITCZ
 * @Date: 2025-06-27
 * @Description: 抽象享元角色
 */
public abstract class Abstractbox {
    // 获取图形的方法
    public abstract String getShape();

    // 显示图形及颜色
    public void display(String color) {
        System.out.println("方块形状：" + getShape() + "，颜色：" + color);
    }
}
